//
//  SearchViewController.m
//  NavBar
//
//  Created by Macintosh User on 10/22/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import "SearchViewController.h"
#import "Constants.h"


@implementation SearchViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
	if (!(self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]))
        return nil;
	
	return self;
}


- (void)viewDidLoad
{
	// Add our custom add button as the nav bar's custom right view
	UIBarButtonItem *addButtonright = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Home", @"")
																		style:UIBarButtonItemStyleBordered
																	   target:self
																	   action:@selector(addAction:)] autorelease];
	self.navigationItem.rightBarButtonItem = addButtonright;
	
}


- (IBAction)addAction:(id)sender
{
	[self.navigationController popViewControllerAnimated:YES];
}


@end
